//权限修改
function privModify(id){
	var name = $("#"+id).val();
	 $.ajax({
			type : 'post',
			url : 'modifyPrivAction.action',
			dataType : 'json',
			data :"privId="+id+"&privName="+name,
			success : function(msg){
				if(msg.state=="success"){
					$("#state"+id).html("<font color='green'>修改成功</font>");
				}else if(msg.state=="error"){
					$("#state"+id).html("<font color='red'>修改失败</font>");
				}else {
					$("#state"+id).html("<font color='red'>用户未登录</font>");
				}
			}
	});
}
//种类修改
function categoryModify(id){
	var name = $("#"+id).val();
	 $.ajax({
			type : 'post',
			url : 'modifyCategoryCodeAction.action',
			dataType : 'json',
			data :"categoryId="+id+"&cateName="+name,
			success : function(msg){
				if(msg.state=="success"){
					$("#state"+id).html("<font color='green'>修改成功</font>");
				}else if(msg.state=="error"){
					$("#state"+id).html("<font color='red'>修改失败</font>");
				}else {
					$("#state"+id).html("<font color='red'>用户未登录</font>");
				}
			}
	});
}
//院系修改
function collegeModify(id){
	var name = $("#"+id).val();
	 $.ajax({
			type : 'post',
			url : 'modifyCollegeCodeAction.action',
			dataType : 'json',
			data :"collegeId="+id+"&collegeName="+name,
			success : function(msg){
				if(msg.state=="success"){
					$("#state"+id).html("<font color='green'>修改成功</font>");
				}else if(msg.state=="error"){
					$("#state"+id).html("<font color='red'>修改失败</font>");
				}else {
					$("#state"+id).html("<font color='red'>用户未登录</font>");
				}
			}
	});
}
//院系添加
function collegeAdd(){
	var name=$("#collegeName").val();
	if(name!=null&&name!=""){
		document.collegeForm.submit();
	}else{
		ymPrompt.alert({message:'请输入院系名称',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
}
//种类添加
function categoryAdd(){
	var name=$("#cateName").val();
	if(name!=null&&name!=""){
		document.categoryForm.submit();
	}else{
		ymPrompt.alert({message:'请输入类别名称',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
}